<template>
  <div>
    <p>It’s a Home Page.</p>
    <span class="iconfont">&#xe62d;</span>
    <img
      :style="{ width: 200 + 'px', height: 380 + 'px' }"
      src="@a/images/fengx1.png"
      alt=""
    />
  </div>
</template>

<script>
import { mocks, tests } from "@/api/home.js";
export default {
  data() {
    return {
      msg: [],
      type: []
    };
  },
  created() {
    console.log("1");
    this.mockFun();
    this.testFun();
  },
  methods: {
    mockFun() {
      mocks().then(res => {
        // this.msg = res.data;
        this.msg = res.data.result.hots;
        console.log(res.data.result);
      });
    },
    testFun() {
      tests().then(res => {
        this.type = res.data.result;
        console.log(res.data);
      });
    }
  }
};
</script>

<style lang="less" scoped>
.fz {
  font-size: 18px;
}
</style>
